﻿class Section {
    private _num: number;
    private _pos: Point;
    private _width: number;
    private _height: number;

    constructor() {
        this._width = 10;
        this._height = 10;
    }

    get num(): number {
        return this._num;
    }

    set num(n: number) {
        this._num = n
    }

    get position(): Point {
        return this._pos;
    }

    set position(p: Point) {
        this._pos = new Point(p.x, p.y);
    }

    draw(ctx: CanvasRenderingContext2D): void {
        ctx.fillRect(this._pos.x, this._pos.y, this._width, this._height);
    }
}